def letters(str):
    new_str = ''
    for i in range(0,len(str)):
        if str[i].isalpha():
            new_str = new_str + str[i]
    return new_str
def reverse(str):
    if str == "":
        return str
    else:
        return reverse(str[1:]) + str[0]
def main():
    str = input("请输入字符串：")
    print("输出的结果为："+letters(reverse(str)))
main()



